package com.yingside.game;

public class Monster extends Enemy{

    public Monster() {
    }

    public Monster(int type){
        switch(type){
            case 1:
                this.setName("软泥怪");
                this.setHp(100);
                this.setAttack(8);
                this.setDefence(2);
                this.setMoney(50);
                break;
            case 2:
                this.setName("蛤蟆怪");
                this.setHp(120);
                this.setAttack(10);
                this.setDefence(4);
                this.setMoney(60);
                break;
            case 3:
                this.setName("蜘蛛怪");
                this.setHp(140);
                this.setAttack(12);
                this.setDefence(6);
                this.setMoney(70);
                break;
            case 4:
                this.setName("狼人怪");
                this.setHp(160);
                this.setAttack(15);
                this.setDefence(10);
                this.setMoney(100);
                break;
        }
    }

    /**
     * 怪兽反击的方法
     * @param h
     */
    public void response(Hero h){
        System.out.println(this.getName() + ",冲向：" + h.getName());
        h.injured(this);
    }


}
